﻿<%@ Page Title="Administradores" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="CadastroAdminPolo.aspx.cs" Inherits="AcadPosApp.Cadastros.CadastroAdminPolo" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .form-inline
        {
            width: 889px;
        }
        .style1
        {
            width: 589px;
        }
        .style2
        {
            width: 578px;
        }
        .style3
        {
            width: 288px;
        }
        .style7
        {
        }
        .style9
        {
            width: 123px;
        }
        .style10
        {
        }
        .style11
        {
            width: 171px;
        }
        .mGrid
        {}
        .style12
        {
            width: 176px;
        }
        .style13
        {
            width: 312px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlConsulta" runat="server" GroupingText="Consulta de Administradores">
                <table class="form-inline">
                    <tr>
                        <td class="style3">
                            <asp:Label ID="Label1" runat="server" Text="Descrição"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtPesquisa" required pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$"
                                title="Apenas letras." runat="server" Width="400px" 
                                Wrap="False"></asp:TextBox>
                        </td>
                        <td>
                            <br />
                            &nbsp;&nbsp;
                            <asp:Button ID="btnConsultar" runat="server" Text="Consultar" 
                                OnClick="btnConsultar_Click" Width="100px" />
                        </td>
                    </tr>
                </table>
                <br />
                <asp:GridView ID="gvwPesquisa" runat="server" AutoGenerateColumns="False" CssClass="mGrid"
                    DataKeyNames="ID_ADMINISTRADOR" EmptyDataText="Dados não localizados..." GridLines="None"
                    Width="45%" OnRowCommand="gvwPesquisa_RowCommand" OnRowCreated="gvwPesquisa_RowCreated"
                    OnRowDataBound="gvwPesquisa_RowDataBound" 
                    onselectedindexchanged="gvwPesquisa_SelectedIndexChanged" 
                    BackColor="White" BorderColor="#999999" BorderStyle="Solid" 
                    BorderWidth="1px" ForeColor="Black">
                    <AlternatingRowStyle BackColor="#CCCCCC" />
                    <Columns>
                        <asp:CommandField ButtonType="Image" SelectImageUrl="~/Imagens/select.png" ShowSelectButton="True" />
                        <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                            <ItemTemplate>
                                <abbr title="Editar">
                                    <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                        formnovalidate="formnovalidate" ImageUrl="~/Imagens/edit.png" Text="Alterar"
                                        Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                            <ItemTemplate>
                                <abbr title="Excluir">
                                    <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                        formnovalidate="formnovalidate" ImageUrl="~/Imagens/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                        Text="Excluir" Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="NOME" HeaderText="Nome">
                            <ItemStyle HorizontalAlign="Left" Width="80%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Situação">
                            <ItemTemplate>
                                <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="SITUACAO" HeaderText="Situação">
                            <ItemStyle HorizontalAlign="Center" Width="25%" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center"/>
                    <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnIncluir" runat="server" formnovalidate="formnovalidate" Text="Inserir"
                        OnClick="btnIncluir_Click" Width="100px" />
                    &nbsp;
                    <asp:Button ID="btnTitulacao" runat="server" formnovalidate="formnovalidate" Text="Titulações"
                        OnClick="btnTitulacao_Click" Visible="False" />
                </div><br />
            </asp:Panel>
            <br />
            <asp:Panel ID="pnlEdicao" runat="server" GroupingText="Cadastro de Administrador"
                Visible="False">
                <table class="form-inline">
                    <tr>
                        <td colspan="5">
                            <asp:Label ID="Label2" runat="server" Text="CPF"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtCPF" required="" pattern="^[0-9]+$" title="Apenas números." 
                                runat="server" Width="300px" AutoPostBack="True" OnTextChanged="TxtCPF_TextChanged"
                                MaxLength="11"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" class="style2">
                            <asp:Label ID="Label3" runat="server" Text="Nome"></asp:Label>
                            <br />
                            <!-- <asp:TextBox ID="TxtNome" required title="Apenas letras." pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" -->
                                <asp:TextBox ID="TxtNome" required="" pattern="^((.)(?!\2{3,}))+$" title="Somente são permitidos 3 caracteres iguais e consecutivos."
                                runat="server" Width="300px" MaxLength="150"></asp:TextBox>
                        </td>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td class="style10" colspan="2">
                            <asp:Label ID="Label17" runat="server" Text="E-mail"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtEmail" required="required" runat="server" Width="300px" MaxLength="150" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$" ></asp:TextBox>
                        </td>
                        <td class="style12">
                            <asp:Label ID="Label37" runat="server" Text="Situação"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlSituacao" runat="server" Height="30px" Width="150px">
                                <asp:ListItem Value="A">Ativo</asp:ListItem>
                                <asp:ListItem Value="I">Inativo</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style1">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style10">
                            <asp:Label ID="Label4" runat="server" Text="RG"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtRG" runat="server" MaxLength="20" 
                                pattern="[0-9]+$" required="" title="Apenas números." Width="140px"></asp:TextBox>
                        </td>
                        <td class="style11">
                            <asp:Label ID="Label35" runat="server" Text="Órgão Expedidor"></asp:Label>
                            <br />
                            &nbsp;&nbsp;
                            <asp:TextBox ID="TxtOrgaoExpedidor" runat="server" MaxLength="5" 
                                pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                                title="Apenas letras." Width="150px"></asp:TextBox>
                        </td>
                        <td class="style12">
                            <asp:Label ID="Label49" runat="server" required="" Text="UF Expedidor"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlUF" runat="server" Width="150px">
                                <asp:ListItem Value="AC">AC</asp:ListItem>
                                <asp:ListItem Value="AL">AL</asp:ListItem>
                                <asp:ListItem Value="AM">AM</asp:ListItem>
                                <asp:ListItem Value="AP">AP</asp:ListItem>
                                <asp:ListItem Value="BA">BA</asp:ListItem>
                                <asp:ListItem Value="CE">CE</asp:ListItem>
                                <asp:ListItem Value="DF">DF</asp:ListItem>
                                <asp:ListItem Value="ES">ES</asp:ListItem>
                                <asp:ListItem Value="GO">GO</asp:ListItem>
                                <asp:ListItem Value="MA">MA</asp:ListItem>
                                <asp:ListItem Value="MG">MG</asp:ListItem>
                                <asp:ListItem Value="MS">MS</asp:ListItem>
                                <asp:ListItem Value="MT">MT</asp:ListItem>
                                <asp:ListItem Value="PA">PA</asp:ListItem>
                                <asp:ListItem Value="PB">PB</asp:ListItem>
                                <asp:ListItem Value="PE">PE</asp:ListItem>
                                <asp:ListItem Value="PI">PI</asp:ListItem>
                                <asp:ListItem Value="PR">PR</asp:ListItem>
                                <asp:ListItem Value="RJ">RJ</asp:ListItem>
                                <asp:ListItem Value="RN">RN</asp:ListItem>
                                <asp:ListItem Value="RO">RO</asp:ListItem>
                                <asp:ListItem Value="RR">RR</asp:ListItem>
                                <asp:ListItem Value="RS">RS</asp:ListItem>
                                <asp:ListItem Value="SC">SC</asp:ListItem>
                                <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                                <asp:ListItem Value="SP">SP</asp:ListItem>
                                <asp:ListItem Value="TO">TO</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style1">
                            <asp:Label ID="Label48" runat="server" Text="Data de Expedição"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtDataExpedicao" runat="server" MaxLength="10" 
                                required="" Width="150px"></asp:TextBox>
                            <!-- <asp:CalendarExtender ID="TxtDataExpedicao_CalendarExtender" runat="server" Enabled="True"
                                TargetControlID="TxtDataExpedicao">
                            </asp:CalendarExtender> -->
                        </td>
                    </tr>
                    <tr>
                        <td class="style10" colspan="2">
                            <asp:Label ID="Label8" runat="server" Text="Nacionalidade"></asp:Label>
                            <asp:TextBox ID="TxtNacionalidade" runat="server" MaxLength="50" 
                               pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                                title="Apenas letras." Width="300px"></asp:TextBox>
                        </td>
                        <td class="style7" colspan="2">
                            <asp:Label ID="Label9" runat="server" Text="Naturalidade"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtNaturalidade" runat="server" MaxLength="50" 
                                pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                                title="Apenas letras." Width="310px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style9" colspan="2">
                            <asp:Label ID="Label11" runat="server" Text="Gênero"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlGenero" Height="30px" required runat="server" 
                                Width="150px">
                                <asp:ListItem Value="F">Feminino</asp:ListItem>
                                <asp:ListItem Value="M">Masculino</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style12">
                            <asp:Label ID="Label10" runat="server" Text="UF Naturalidade"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlUFNaturalidade" runat="server" required=""
                                Width="150px">
                                <asp:ListItem Value="AC">AC</asp:ListItem>
                                <asp:ListItem Value="AL">AL</asp:ListItem>
                                <asp:ListItem Value="AM">AM</asp:ListItem>
                                <asp:ListItem Value="AP">AP</asp:ListItem>
                                <asp:ListItem Value="BA">BA</asp:ListItem>
                                <asp:ListItem Value="CE">CE</asp:ListItem>
                                <asp:ListItem Value="DF">DF</asp:ListItem>
                                <asp:ListItem Value="ES">ES</asp:ListItem>
                                <asp:ListItem Value="GO">GO</asp:ListItem>
                                <asp:ListItem Value="MA">MA</asp:ListItem>
                                <asp:ListItem Value="MG">MG</asp:ListItem>
                                <asp:ListItem Value="MS">MS</asp:ListItem>
                                <asp:ListItem Value="MT">MT</asp:ListItem>
                                <asp:ListItem Value="PA">PA</asp:ListItem>
                                <asp:ListItem Value="PB">PB</asp:ListItem>
                                <asp:ListItem Value="PE">PE</asp:ListItem>
                                <asp:ListItem Value="PI">PI</asp:ListItem>
                                <asp:ListItem Value="PR">PR</asp:ListItem>
                                <asp:ListItem Value="RJ">RJ</asp:ListItem>
                                <asp:ListItem Value="RN">RN</asp:ListItem>
                                <asp:ListItem Value="RO">RO</asp:ListItem>
                                <asp:ListItem Value="RR">RR</asp:ListItem>
                                <asp:ListItem Value="RS">RS</asp:ListItem>
                                <asp:ListItem Value="SC">SC</asp:ListItem>
                                <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                                <asp:ListItem Value="SP">SP</asp:ListItem>
                                <asp:ListItem Value="TO">TO</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <asp:Label ID="Label12" runat="server" Text="Estado Civil"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlEstadoCivil" runat="server" Height="30px" 
                                Width="150px">
                                <asp:ListItem>Solteiro(a)</asp:ListItem>
                                <asp:ListItem>Casado(a)</asp:ListItem>
                                <asp:ListItem>Divorciado(a)</asp:ListItem>
                                <asp:ListItem>Viúvo(a)</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td class="style9" colspan="2">
                            <asp:Label ID="Label14" runat="server" Text="Nº ISS"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtISS" pattern="[0-9]+$" title="Apenas números."
                                runat="server" Width="150px" MaxLength="20"></asp:TextBox>
                            &nbsp;</td>
                        <td class="style12">
                            <asp:Label ID="Label15" runat="server" Text="Nº PIS"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtPIS" runat="server" pattern="[0-9]+$" title="Apenas números."
                                Width="150px" MaxLength="20"></asp:TextBox>
                        </td>
                        <td colspan="2">
                            <asp:Label ID="Label40" runat="server" Text="Nº Reg. Profissional"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtRegProf" runat="server" Height="30px" pattern="[0-9]+$" title="Apenas números."
                                Width="150px" MaxLength="20"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style10" colspan="2">
                            <asp:Label ID="Label19" runat="server" Text="Telefone"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtDDDTel" runat="server" MaxLength="3" 
                                pattern="[0-9]+$" placeholder="0XX" required="" Width="80px"></asp:TextBox>
                            &nbsp;<asp:TextBox ID="TxtTelefone" runat="server" MaxLength="9" 
                                name="phone" pattern="[0-9]{4,6}-[0-9]{3,4}$" placeholder="XXXX-XXXX" 
                                required="" Width="210px"></asp:TextBox>
                        </td>
                        <td class="style7" colspan="3">
                            <asp:Label ID="Label34" runat="server" Text="Celular"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtDDDCel" runat="server" MaxLength="3" pattern="[0-9]+$" 
                                placeholder="0XX" Width="80px"></asp:TextBox>
                            &nbsp;
                            <asp:TextBox ID="TxtCelular" runat="server" MaxLength="9" 
                                pattern="[0-9]{4,6}-[0-9]{3,4}$" placeholder="XXXX-XXXX" Width="220px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="style10">
                            <asp:Label ID="Label22" runat="server" Text="Pai"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtPai" runat="server" Height="30px" MaxLength="150" 
                                pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" title="Apenas letras." 
                                Width="300px"></asp:TextBox>
                        </td>
                        <td class="style7" colspan="3">
                            <asp:Label ID="Label23" runat="server" Text="Mãe"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtMae" runat="server" Height="30px" MaxLength="150" 
                                pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                                title="Apenas letras." Width="310px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5">
                            <asp:Label ID="Label24" runat="server" Text="CEP"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtCEP" runat="server" pattern="[0-9]+$"
                                title="Apenas números." required="" Width="300px" MaxLength="8" 
                                placeholder="48330000"></asp:TextBox>
                            &nbsp;
                            <asp:Button ID="btnConsultarCEP" runat="server" formnovalidate="formnovalidate" 
                                OnClick="btnConsultarCEP_Click" Text="Consultar" Width="100px" />
                            <br />
                            <tr>
                                <td class="style9" colspan="2">
                                    <asp:Label ID="Label41" runat="server" Text="Endereço"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtEndereco" runat="server" MaxLength="200" 
                                        required="" Width="300px"></asp:TextBox>
                                </td>
                                <td class="style12">
                                    <asp:Label ID="Label43" runat="server" Text="Número"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtNumero" runat="server" MaxLength="5" 
                                        pattern="[0-9]+$" required="" title="Apenas números." Width="150px"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Label ID="Label27" runat="server" Text="Complemento"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtComplemento" runat="server" MaxLength="100" 
                                        type="text" Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="style9" colspan="2">
                                    <asp:Label ID="Label42" runat="server" Text="Bairro"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtBairro" runat="server" MaxLength="50" 
                                        required="" type="text" Width="300px"></asp:TextBox>
                                </td>
                                <td class="style12">
                                    <asp:Label ID="Label29" runat="server" Text="UF"></asp:Label>
                                    <br />
                                    <asp:DropDownList ID="ddlUFEnd" runat="server" required="" 
                                        Width="150px">
                                        <asp:ListItem Value="AC">AC</asp:ListItem>
                                        <asp:ListItem Value="AL">AL</asp:ListItem>
                                        <asp:ListItem Value="AM">AM</asp:ListItem>
                                        <asp:ListItem Value="AP">AP</asp:ListItem>
                                        <asp:ListItem Value="BA">BA</asp:ListItem>
                                        <asp:ListItem Value="CE">CE</asp:ListItem>
                                        <asp:ListItem Value="DF">DF</asp:ListItem>
                                        <asp:ListItem Value="ES">ES</asp:ListItem>
                                        <asp:ListItem Value="GO">GO</asp:ListItem>
                                        <asp:ListItem Value="MA">MA</asp:ListItem>
                                        <asp:ListItem Value="MG">MG</asp:ListItem>
                                        <asp:ListItem Value="MS">MS</asp:ListItem>
                                        <asp:ListItem Value="MT">MT</asp:ListItem>
                                        <asp:ListItem Value="PA">PA</asp:ListItem>
                                        <asp:ListItem Value="PB">PB</asp:ListItem>
                                        <asp:ListItem Value="PE">PE</asp:ListItem>
                                        <asp:ListItem Value="PI">PI</asp:ListItem>
                                        <asp:ListItem Value="PR">PR</asp:ListItem>
                                        <asp:ListItem Value="RJ">RJ</asp:ListItem>
                                        <asp:ListItem Value="RN">RN</asp:ListItem>
                                        <asp:ListItem Value="RO">RO</asp:ListItem>
                                        <asp:ListItem Value="RR">RR</asp:ListItem>
                                        <asp:ListItem Value="RS">RS</asp:ListItem>
                                        <asp:ListItem Value="SC">SC</asp:ListItem>
                                        <asp:ListItem Selected="True" Value="SE">SE</asp:ListItem>
                                        <asp:ListItem Value="SP">SP</asp:ListItem>
                                        <asp:ListItem Value="TO">TO</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <asp:Label ID="Label30" runat="server" Text="Cidade"></asp:Label>
                                    <br />
                                    <asp:TextBox ID="TxtCidade" runat="server" MaxLength="50" 
                                        pattern="[çÇùÙúÚôÔõÕòÒóÓìÌíÍêÊèÈéÉáÁàÀãÃâÂaA-zZ\s]+$" required="" 
                                        title="Apenas letras." Width="300px"></asp:TextBox>
                                </td>
                            </tr>
                        </td>
                    </tr>
                    <tr>
                        <td class="style9" colspan="2">
                            <asp:Label ID="Label44" runat="server" Text="Banco"></asp:Label>
                            <br />
                            <asp:DropDownList ID="ddlBanco" runat="server" Width="300px" 
                                AppendDataBoundItems="True" AutoPostBack="True">
                                <asp:ListItem Selected="True" Value="0">SELECIONE</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style12">
                            <asp:Label ID="Label45" runat="server" Text="Agência"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtAgencia" runat="server" Width="150px" 
                                MaxLength="10"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Label ID="Label46" runat="server" Text="Conta"></asp:Label>
                            <br />
                            <asp:TextBox ID="TxtConta" runat="server" Width="150px" 
                                MaxLength="10"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnConfirmar" runat="server" Text="Confirmar" 
                        OnClick="btnConfirmar_Click" Width="100px" />
                    &nbsp;<asp:Button ID="btnCancelar" formnovalidate="formnovalidate" CausesValidation="false"
                        runat="server" Text="Cancelar" OnClick="btnCancelar_Click" Width="100px" />
                </div><br />
            </asp:Panel>
            <asp:Panel ID="pnlTitulacoes" runat="server" GroupingText="Titulações" Visible="False">
                <asp:GridView ID="gvwTitulacoes" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    CssClass="mGrid" DataKeyNames="ID_ADMINISTRADOR_TITULACAO" EmptyDataText="Dados não localizados..."
                    GridLines="Vertical" OnRowCommand="gvwTitulacoes_RowCommand" OnRowCreated="gvwTitulacoes_RowCreated"
                    OnRowDataBound="gvwTitulacoes_RowDataBound" Width="55%">
                    <AlternatingRowStyle BackColor="#D3D3D3" />
                    <Columns>
                        <asp:TemplateField HeaderText="Editar" ShowHeader="False">
                            <ItemTemplate>
                                <abbr title="Editar Titulação!">
                                    <asp:ImageButton ID="ImgAlterar" runat="server" CausesValidation="false" CommandName="Alterar"
                                        formnovalidate="formnovalidate" ImageUrl="~/Imagens/edit.png" Text="Alterar"
                                        Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Excluir" ShowHeader="False">
                            <ItemTemplate>
                                <abbr title="Excluir titulação!">
                                    <asp:ImageButton ID="ImgExcluir" runat="server" CausesValidation="false" CommandName="Excluir"
                                        formnovalidate="formnovalidate" ImageUrl="~/Imagens/delete.png" OnClientClick="return ShowConfirm('Tem certeza que deseja excluir?', this.ID);"
                                        Text="Excluir" Width="20px" />
                                </abbr>
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" Width="1%" />
                            <ItemStyle HorizontalAlign="Center" Width="1%" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="NIVEL" HeaderText="Nível">
                            <ItemStyle HorizontalAlign="Left" Width="30%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TITULO" HeaderText="Título">
                            <ItemStyle HorizontalAlign="Left" Width="30%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="ANO_CONCLUSAO" HeaderText="Ano Conclusão">
                            <ItemStyle HorizontalAlign="Center" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="INSTITUICAO" HeaderText="Instituição">
                            <ItemStyle HorizontalAlign="Left" Width="30%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="Status">
                            <ItemTemplate>
                                <asp:Image ID="imgStatus" runat="server" Height="25px" Width="25px" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="SITUACAO" HeaderText="Status">
                            <ItemStyle HorizontalAlign="Center" Width="25%" />
                        </asp:BoundField>
                    </Columns>
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <PagerStyle CssClass="pagination" ForeColor="Black" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#1E90FF" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#808080" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#383838" />
                </asp:GridView>
                <br />
                <div class="legenda">
                    <asp:Button ID="btnInserirTitulacao" runat="server" OnClick="btnInserirTitulacao_Click"
                        Text="Inserir" Width="100px" />
                    &nbsp;<asp:Button ID="btnCancelarInclusaoTitulacao" runat="server" formnovalidate="" 
                        OnClick="btnCancelarInclusaoTitulacao_Click" Text="Cancelar" 
                        Width="100px" />
                </div>
                <br />
                <br />
                <asp:Panel ID="pnlCadastroTitulacao" runat="server" GroupingText="Cadastro de Titulações"
                    Visible="False">
                    <table class="style2">
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label5" runat="server" Text="Nível de Titulação"></asp:Label>
                                <br />
                                <asp:DropDownList ID="ddlNivelTitulacao" runat="server" Width="300px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="style13">
                                <asp:Label ID="Label6" runat="server" Text="Titulação"></asp:Label>
                                <br />
                                <asp:TextBox ID="TxtTitulacao" required type="text" runat="server" Width="300px"
                                    MaxLength="100"></asp:TextBox>
                            </td>
                            <td>
                                <asp:Label ID="Label47" runat="server" Text="Ano Conclusão"></asp:Label>
                                <br />
                                <asp:DropDownList ID="ddlAnoConclusao" runat="server" Width="150px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label7" runat="server" Text="Instituição"></asp:Label>
                                <br />
                                <asp:TextBox ID="TxtInstituicao" type="text" required runat="server" Width="300px"
                                    MaxLength="100"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="Label13" runat="server" Text="Situação"></asp:Label>
                                <br />
                                <asp:DropDownList ID="ddlSituacaoTitulacao" runat="server" Width="150px">
                                    <asp:ListItem Value="A">Ativo</asp:ListItem>
                                    <asp:ListItem Value="I">Inativo</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                    <div class="legenda">
                        <asp:Button ID="btnConfirmarTitulacao" runat="server" Text="Confirmar" 
                            OnClick="btnConfirmarTitulacao_Click" Width="100px" />
                        &nbsp;<asp:Button ID="btnCancelarTitulacao" runat="server" formnovalidate="" OnClick="btnCancelarTitulacao_Click"
                            Text="Cancelar" Width="100px" />
                    </div><br />
                </asp:Panel>
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="TxtCPF" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
